import packageJson from '../package.json';

const { name, version, config } = packageJson;
export const pathName = process.env.PUBLIC_URL ? `${process.env.PUBLIC_URL}/${name}/${version}/static` : 'static';

export default {
  code: name,
  version,
  width: config.width,
  height: config.height,
  coordinate: {
    x: 0,
    y: 0,
  },
  config: [
    {
      name: '子组件管理',
      code: 'mapSelect',
      type: 'MapSelect',
      value: '',
      enumValue: [],
    },
    {
      name: '地图服务配置',
      code: 'mapServiceConfig',
      children: [
        {
          name: '显示地图',
          code: 'isShowMap',
          type: 'CheckBox',
          value: true,
        },
        {
          name: '地图服务配置',
          code: 'mapType',
          type: 'selectMap',
          value: 'tianDi',
        },
      ],
    },
    {
      name: '地图基础配置',
      code: 'mapBaseConfig',
      children: [
        {
          name: '默认角度',
          code: 'pitch',
          value: 45,
          max: 60,
          min: 0,
          type: 'InputNumber',
        },
        {
          name: '中心点经度(-180~180)',
          code: 'lng',
          value: 106.39,
          step: 0.1,
          max: 180,
          min: -180,
          type: 'InputNumber',
        },
        {
          name: '中心点纬度(-90~90)',
          code: 'lat',
          value: 36.55,
          step: 0.1,
          max: 90,
          min: -90,
          type: 'InputNumber',
        },
        {
          name: '默认缩放比例(3~19)',
          code: 'zoom',
          value: 3,
          max: 19,
          min: 3,
          type: 'InputNumber',
        },
        {
          name: '最小缩放比例(3~19) ',
          code: 'minZoom',
          value: 3,
          max: 19,
          min: 3,
          type: 'InputNumber',
        },
        {
          name: '最大缩放比例(3~19) ',
          code: 'maxZoom',
          value: 14,
          max: 19,
          min: 3,
          type: 'InputNumber',
        },
        {
          name: '开启旋转',
          code: 'dragRotate',
          value: true,
          type: 'CheckBox',
        },
        {
          name: '开启拖拽',
          code: 'dragable',
          value: true,
          type: 'CheckBox',
        },
        {
          name: '开启缩放',
          code: 'zoomable',
          value: true,
          type: 'CheckBox',
        },
      ],
    },
  ],
  defaultComp: [{ code: 'custom_demo_esthesia_scatter' }, { code: 'custom_demo_esthesia_analyzeTools' }],
};
